{template "header.html", "/"}
<!--<script src="{THEME_PATH}party/js/banner.js"></script>-->

<style>
    .news-right-nav .nav-selected {
        background: #c50c11;
        color: #fff;
    }
    
    .nav-switch {
        height: 100%;
        display: flex;
    }
    
    .nav-switch li {
        height: 100%;
        display: inline;
        cursor: pointer;
    }
</style>
<div class="page-container" id="page">
    <!--<div class="layui-carousel part" id="test2">-->
    <!--<div carousel-item="">-->
    <!--{navigator type=5}-->
    <!--<div><img src="{dr_get_file($t.thumb)}" alt="" style="width:10rem; height: 100%"></div>-->
    <!--{/navigator}-->
    <!--</div>-->
    <!--</div>-->

    <div class="news">
        <div class="news-left">
            <div id="myFocus" class="mF_liuzg">
                <div class="loading"><span>请稍候...</span></div>
                <ul class="pic">
                    {module module=news flag=1}
                    <li>
                        <a href="{$t.url}" target="_blank"><img src="{dr_thumb($t.thumb,470,310)}" /></a>
                        <span class="txt-bg"><a href="{$t.url}" target="_blank">{dr_strcut($t.title,21)}</a></span>
                    </li>
                    {/module}
                </ul>
            </div>

        </div>
        <div class="news-right">
            <div class="news-right-nav">
                <ul class="nav-switch">
                    {category module=news pid=0 id=1 return=c}
                    <li class="nav-selected" style="float: left;"><input type="hidden" value="{$c.url}">{$c.name}</li>
                    {/category} {category module=news pid=0 id=5 return=c}
                    <li style="float: left;"><input type="hidden" value="{$c.url}">{$c.name}</li>
                    {/category}
                </ul>
                <div class="news-more"><a id="nav-url" href="#"> 更多>> </a> </div>
            </div>
            <div class="news-right-list">
                <div>
                    {module module=news num=7 catid=1}
                    <a href="{$t.url}">
                        <li>
                            <span>{dr_strcut($t.title,29)}</span>
                            <div class="news-right-list-time">{dr_date($t._updatetime, 'm-d')}</div>
                        </li>
                    </a>
                    {/module}
                </div>

                <div style="display: none;">
                    {module module=news num=7 catid=5}
                    <a href="{$t.url}">
                        <li>
                            <span>{dr_strcut($t.title,29)}</span>
                            <div class="news-right-list-time">{dr_date($t._updatetime, 'm-d')}</div>
                        </li>
                    </a>
                    {/module}
                </div>

            </div>
        </div>
    </div>
    <div class="mid" style="padding: 0; height: auto;">
        {category module=news pid=0 id=7 return=c}
        <div class="mid-box">
            <div class="mid-box-top">
                <div class="mid-box-top-left">
                    <img src="{THEME_PATH}party/images/redlogo.jpg" alt="">
                    <span>{$c.name}</span>
                </div>
                <div class="mid-box-top-right">
                    <a href="{$c.url}">更多>></a>
                </div>
            </div>
            {module module=news order=updatetime num=5 catid=$c.id}
            <a href="{$t.url}">
                <li>
                    <span class="sp">{dr_strcut($t.title,16)}</span>
                    <div class="news-right-list-time">{dr_date($t._updatetime, 'm-d')}</div>
                </li>
            </a>
            {/module}
        </div>
        {/category} {category module=news pid=0 id=13 return=c}
        <div class="mid-box">
            <div class="mid-box-top">
                <div class="mid-box-top-left">
                    <img src="{THEME_PATH}party/images/redlogo.jpg" alt="">
                    <span>{$c.name}</span>
                </div>
                <div class="mid-box-top-right">
                    <a href="{$c.url}">更多>></a>
                </div>
            </div>
            {module module=news order=updatetime num=5 catid=$c.id}
            <a href="{$t.url}">
                <li>
                    <span class="sp">{dr_strcut($t.title,16)}</span>
                    <div class="news-right-list-time">{dr_date($t._updatetime, 'm-d')}</div>
                </li>
            </a>
            {/module}
        </div>
        {/category} {category module=news pid=0 id=6 return=c}
        <div class="mid-box">
            <div class="mid-box-top">
                <div class="mid-box-top-left">
                    <img src="{THEME_PATH}party/images/redlogo.jpg" alt="">
                    <span>{$c.name}</span>
                </div>
                <div class="mid-box-top-right">
                    <a href="{$c.url}">更多>></a>
                </div>
            </div>
            {module module=news order=updatetime num=5 catid=$c.id}
            <a href="{$t.url}">
                <li>
                    <span class="sp">{dr_strcut($t.title,16)}</span>
                    <div class="news-right-list-time">{dr_date($t._updatetime, 'm-d')}</div>
                </li>
            </a>
            {/module}
        </div>
        {/category} {category module=news pid=0 id=2 return=c}
        <div class="mid-box">
            <div class="mid-box-top">
                <div class="mid-box-top-left">
                    <img src="{THEME_PATH}party/images/redlogo.jpg" alt="">
                    <span>{$c.name}</span>
                </div>
                <div class="mid-box-top-right">
                    <a href="{$c.url}">更多>></a>
                </div>
            </div>
            {module module=news order=updatetime num=5 catid=$c.id}
            <a href="{$t.url}">
                <li>
                    <span class="sp">{dr_strcut($t.title,16)}</span>
                    <div class="news-right-list-time">{dr_date($t._updatetime, 'm-d')}</div>
                </li>
            </a>
            {/module}
        </div>
        {/category} {category module=news pid=0 id=3 return=c}
        <div class="mid-box">
            <div class="mid-box-top">
                <div class="mid-box-top-left">
                    <img src="{THEME_PATH}party/images/redlogo.jpg" alt="">
                    <span>{$c.name}</span>
                </div>
                <div class="mid-box-top-right">
                    <a href="{$c.url}">更多>></a>
                </div>
            </div>
            {module module=news order=updatetime num=5 catid=$c.id}
            <a href="{$t.url}">
                <li>
                    <span class="sp">{dr_strcut($t.title,16)}</span>
                    <div class="news-right-list-time">{dr_date($t._updatetime, 'm-d')}</div>
                </li>
            </a>
            {/module}
        </div>
        {/category} {category module=news pid=0 id=14 return=c}
        <div class="mid-box">
            <div class="mid-box-top">
                <div class="mid-box-top-left">
                    <img src="{THEME_PATH}party/images/redlogo.jpg" alt="">
                    <span>{$c.name}</span>
                </div>
                <div class="mid-box-top-right">
                    <a href="{$c.url}">更多>></a>
                </div>
            </div>
            {module module=news order=updatetime num=5 catid=$c.id}
            <a href="{$t.url}">
                <li>
                    <span class="sp">{dr_strcut($t.title,16)}</span>
                    <div class="news-right-list-time">{dr_date($t._updatetime, 'm-d')}</div>
                </li>
            </a>
            {/module}
        </div>
        {/category}
    </div>
    <div class="photo-banner">
        <div class="dangnav">
            <li>{dr_cat_value("news",8,'name')}</li>
        </div>
        <div class="photo-banner-mid">
            <div class="bot-news-wrap">
                <div class="photo-top">
                    <div class="photo-top-li-on" onclick="chooseone2()" id="csone2">{dr_cat_value("news",9,'name')}</div>
                    <div class="photo-top-li" id="cstwo2" onclick="choosetwo2()">{dr_cat_value("news",10,'name')}</div>
                    <div class="news-more" id="listmore"><a href="{dr_cat_value("news",9,'url')}"> 更多>> </a></div>
                    <div class="news-more" id="listmore2" style="display: none;"><a href="{dr_cat_value("news",10,'url')}"> 更多>> </a></div>
                </div>
                <ul id="list">
                    {module module=news catid=9 num=4}
                    <a href="{$t.url}">
                        <li>{dr_strcut($t.title,26)}</li>
                    </a>
                    {/module}
                </ul>
                <ul id="list2" style="display: none">
                    {module module=news catid=10 num=4}
                    <a href="{$t.url}">
                        <li>{dr_strcut($t.title,26)}</li>
                    </a>
                    {/module}
                </ul>
            </div>
            <div class="photo-warp" style="overflow: hidden;">
                <div class="swiper-button-prev" id="prev"></div>
                <div class="swiper-button-next" id="next"></div>
                <div class="photo-top">
                    <div class="photo-top-li-on" onclick="chooseone()" id="csone">{dr_cat_value("news",11,'name')}</div>
                    <div class="photo-top-li" id="cstwo" onclick="choosetwo()">{dr_cat_value("news",12,'name')}</div>
                    <div class="news-more" id="more"><a href="{dr_cat_value("news",11,'url')}"> 更多>> </a></div>
                    <div class="news-more" id="more2" style="display: none;"><a href="{dr_cat_value("news",12,'url')}"> 更多>> </a></div>
                </div>
                
                <div class="swiper-container" id='banner1' style="width: 94%; height: 100%; padding-left: 13px;">
                <div class="swiper-wrapper">
                   {module module=news catid=11 num=8 return=p}
                    <div class="swiper-slide ph-img">
                        <a href="{$p.url}">
                            <img src="{dr_thumb($p.thumb,220,150)}" alt="" style="width: 150px; object-fit:scale-down">
                            <div class="ph-img-bt">{dr_strcut($p.title,8)}</div>
                        </a>
                    </div>
                    {/module}
               </div>
                
               
            </div>

           
            <!-- 2 -->
            <div class="swiper-button-prev" id="prev2" style="display: none;"></div>
            <div class="swiper-button-next" id="next2" style="display: none;"></div>
            <div class="swiper-container clas2" id='banner2' style="display: none; width: 94%; height: 100%; padding-left: 13px;">
                <div class="swiper-wrapper">
                   {module module=news catid=12 num=8 return=p}
                    <div class="swiper-slide ph-img">
                        <a href="{$p.url}">
                            <img src="{dr_thumb($p.thumb,220,150)}" alt="" style="width: 150px;object-fit:scale-down">
                            <div class="ph-img-bt">{dr_strcut($p.title,8)}</div>
                        </a>
                    </div>
                    {/module}
               </div>
            </div>
                
            </div>
        </div>
    </div>

    <div class="go">
        <span style="float: left; margin-left: 15px;">友情链接：</span>
        <div class="sel">
            <select class="float_l bot" onchange="javascript:window.open(this.options[this.selectedIndex].value)">
                <option value="" selected="selected"> --- 党建网站 --- &nbsp;&nbsp;</option>
                {navigator type=1 return=n}
                <option value="{$n.url}">{$n.name}</option>
                {/navigator}
            </select>
        </div>
        <div class="sel">
            <select class="float_l bot" onchange="javascript:window.open(this.options[this.selectedIndex].value)">
                <option value="" selected="selected"> --- 新闻媒体网站 --- &nbsp;&nbsp;</option>
                {navigator type=2 return=n}
                <option value="{$n.url}">{$n.name}</option>
                {/navigator}
            </select>
        </div>
        <div class="sel">
            <select class="float_l bot" onchange="javascript:window.open(this.options[this.selectedIndex].value)">
                <option value="" selected="selected"> --- 省市党建网站 --- &nbsp;&nbsp;</option>
                {navigator type=3 return=n}
                <option value="{$n.url}">{$n.name}</option>
                {/navigator}
            </select>
        </div>
        <div class="sel">
            <select class="float_l bot" onchange="javascript:window.open(this.options[this.selectedIndex].value)">
                <option value="" selected="selected"> --- 市内党建网站 --- &nbsp;&nbsp;</option>
                {navigator type=4 return=n}
                <option value="{$n.url}">{$n.name}</option>
                {/navigator}
            </select>
        </div>
    </div>
</div>
<div style="display: none" id="page2" class="page2">
    <div>请使用PC端浏览</div>
    <img src="{THEME_PATH}party/images/404.jpg" alt="">
    <!-- <img src="../images/404.jpg"> -->
</div>
   <script src="{THEME_PATH}party/js/banner.js"></script>
<script>

  function chooseone() {
        document.getElementById('banner1').style.display = "block"
        document.getElementById('banner2').style.display = "none"
        document.getElementById('more').style.display = "block"
        document.getElementById('more2').style.display = "none"
        document.getElementById("csone").className = "photo-top-li-on";
        document.getElementById("cstwo").className =  "photo-top-li";
        document.getElementById('prev').style.display = 'block'
        document.getElementById('prev2').style.display = 'none'
        document.getElementById('next').style.display = 'block'
        document.getElementById('next2').style.display = 'none'
    }

  function choosetwo() {
        document.getElementById('banner1').style.display = "none"
        document.getElementById('banner2').style.display = "block"
        document.getElementById('more').style.display = "none"
        document.getElementById('more2').style.display = "block"
        document.getElementById("csone").className = "photo-top-li";
        document.getElementById("cstwo").className =  "photo-top-li-on";
        document.getElementById('prev').style.display = 'none'
        document.getElementById('prev2').style.display = 'block'
        document.getElementById('next').style.display = 'none'
        document.getElementById('next2').style.display = 'block'
        var mySwiper2 = new Swiper('.clas2', {
            effect: 'Progress', // 垂直切换选项
            loop: true, // 循环模式选项
            slidesPerView: "2",
            autoplay : 3000,
        })
        $('#prev2').click(function(){
        mySwiper2.swipePrev(); 
       })
        $('#next2').click(function(){
        mySwiper2.swipeNext(); 
       })
    }

  var  chooseone2 = function chooseone2() {
        document.getElementById('list').style.display = "block"
        document.getElementById('list2').style.display = "none"
        document.getElementById('listmore').style.display = "block"
        document.getElementById('listmore2').style.display = "none"
        $("#csone2").attr("class", "photo-top-li-on");
        $("#cstwo2").attr("class", "photo-top-li");
    }

 var choosetwo2 = function choosetwo2() {
        document.getElementById('list').style.display = "none"
        document.getElementById('list2').style.display = "block"
        document.getElementById('listmore').style.display = "none"
        document.getElementById('listmore2').style.display = "block"
        $("#csone2").attr("class", "photo-top-li");
        $("#cstwo2").attr("class", "photo-top-li-on");
    }
</script>
<script>
    document.ready = function() {
        var nav = document.getElementById('nav-url');
        nav.setAttribute('href', $(".nav-selected").children("input")[0].value);
    };
</script>
<script>
    $(function() {
        $(".nav-switch li").click(
            function() {
                var divShow = $(".news-right-list").children("div");
                if (!$(this).hasClass('nav-selected')) {
                    var index = $(this).index();
                    $(this).attr("class", 'nav-selected');
                    $(this).siblings('li').removeClass('nav-selected');
                    $(divShow[index]).show();
                    $(divShow[index]).siblings("div").hide();
                    var nav = document.getElementById('nav-url');
                    nav.setAttribute('href', $(this).children('input')[0].value);
                }
            }
        )
    })
</script>
<script src="{THEME_PATH}party/js/idangerous.swiper2.7.6.min.js"></script>
<script>
    window.onload = function() {
            var mySwiper = new Swiper('.swiper-container', {
            effect: 'Progress', // 垂直切换选项
            loop: true, // 循环模式选项
            slidesPerView: "2",
            autoplay : 3000,
            // 如果需要前进后退按钮
        })
     $('#prev').click(function(){
        mySwiper.swipePrev(); 
       })
     $('#next').click(function(){
        mySwiper.swipeNext(); 
       })
    }
</script>
{template "footer.html", "/"}